:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #e1e8ed;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    height: 70px;
}

.navbar .brand {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.navbar .brand:hover {
    color: #357abd;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 搜索框样式 */
.nav-search {
    max-width: 400px;
    width: 100%;
}

.nav-search form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--secondary-color);
    color: var(--text-color);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar .container {
        grid-template-columns: 1fr;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .nav-search {
        order: 3;
        max-width: none;
    }
    
    .nav-links {
        order: 2;
    }
    
    .nav-links a {
        margin: 0 10px;
    }
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 20px 0;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    background: #357abd;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #c0392b;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

/* 头像样式 */
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
}

/* 提示消息样式 */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 16px 0;
    background: #6eb1ef;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .nav-links {
        margin-top: 15px;
    }
    
    .nav-links a {
        margin: 0 10px;
    }
}

/* 认证页面样式 */
.auth-container {
    max-width: 480px;
    margin: 60px auto;
}

.auth-card {
    padding: 30px;
}

.auth-card h2 {
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

.error {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* 表单按钮样式优化 */
.auth-card .btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .auth-container {
        margin: 20px auto;
    }
    
    .auth-card {
        padding: 20px;
    }
}

/* 夫妻列表页样式 */
.couples-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.couples-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-color);
}

.filters {
    display: flex;
    gap: 15px;
}

.filters select {
    min-width: 120px;
    padding: 8px 12px;
}

.couples-grid {
    margin-top: 30px;
}

.couple-card {
    display: flex;
    flex-direction: column;
}

.couple-avatars {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.avatar-container {
    text-align: center;
}

.avatar-container .name {
    display: block;
    margin-top: 8px;
    font-weight: 500;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

.story-preview {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.likes {
    color: var(--danger-color);
}

.likes i {
    margin-right: 5px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num, .current-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 500;
}

.page-num {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-num:hover {
    background: var(--secondary-color);
}

.current-page {
    background: var(--primary-color);
    color: #fff;
}

/* 回复样式 */
.comment.reply {
    margin-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.reply-form {
    margin: 10px 0;
    padding: 10px;
    background: var(--secondary-color);
    border-radius: 6px;
}

.reply-input {
    margin-bottom: 10px;
}

.replies {
    margin-top: 10px;
}

/* 评论样式 */
.comments-section {
    margin-top: 40px;
}

.comments-section h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--text-color);
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    min-height: 100px;
    margin-bottom: 15px;
}

.login-prompt {
    text-align: center;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 8px;
}

.login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.comment {
    margin-bottom: 20px;
    transition: all 0.3s;
}

.comment.reply {
    margin-left: 40px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

.comment-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-actions button {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--text-color);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-actions button:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.comment-actions button i {
    margin-right: 5px;
}

.reply-form {
    margin: 15px 0;
    padding: 15px;
    background: var(--secondary-color);
    border-radius: 6px;
}

.reply-form textarea {
    margin-bottom: 10px;
}

/* 点赞效果 */
.liked {
    color: var(--danger-color);
}

/* 投票按钮样式 */
.voting-section {
    margin: 30px 0;
    text-align: center;
}

.vote-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.vote-btn {
    min-width: 150px;
}

.vote-btn i {
    margin-right: 8px;
}

.vote-btn.voted {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 页脚样式 */
.site-footer {
    flex-shrink: 0;
    background: #2c3e50;
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info li i {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-info li {
        justify-content: center;
    }
}

/* 夫妻详情页样式 */
.couple-detail {
    padding: 40px;
    margin-top: 30px;
}

.couple-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.couple-side {
    flex: 1;
    text-align: center;
    padding: 20px;
}

.couple-center {
    flex: 1;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.avatar.large {
    width: 180px;
    height: 180px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.avatar.large:hover {
    transform: scale(1.05);
}

.couple-side h2 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.couple-side .info {
    color: var(--text-color);
    opacity: 0.8;
    margin: 8px 0;
}

.marriage-info {
    margin-top: 20px;
}

.marriage-info .years {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.likes {
    margin-top: 20px;
}

.like-btn {
    font-size: 18px;
    padding: 12px 30px;
}

.like-btn i {
    margin-right: 8px;
}

.couple-story {
    margin: 40px 0;
    padding: 30px;
    background: var(--secondary-color);
    border-radius: 12px;
}

.couple-story h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.couple-story p {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 16px;
}

.voting-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.voting-section h3 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.vote-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.vote-btn {
    min-width: 180px;
    padding: 15px 30px;
    font-size: 18px;
}

/* 首页样式优化 */
.quote-section {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(to right, var(--primary-color), #357abd);
    margin: -20px -20px 40px;
    color: #fff;
}

.quote-card {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quote-text {
    font-size: 28px;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 20px;
}

.quote-author {
    font-size: 18px;
    opacity: 0.9;
}

.featured-couple {
    margin: 60px 0;
}

.featured-couple h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.featured-card {
    padding: 40px;
    text-align: center;
}

.couple-images {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 30px;
}

.couple-avatar {
    text-align: center;
}

.couple-avatar h3 {
    margin-top: 15px;
    font-size: 20px;
    color: var(--text-color);
}

.other-couples {
    margin: 60px 0;
}

.other-couples h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

.view-all .btn {
    padding: 15px 40px;
    font-size: 18px;
}

/* Toast 样式更新 */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast i {
    font-size: 20px;
}

.toast.success {
    background: rgba(46, 204, 113, 0.95);
}

.toast.error {
    background: rgba(231, 76, 60, 0.95);
}

.toast.info {
    background: rgba(52, 152, 219, 0.95);
}

.toast.warning {
    background: rgba(241, 196, 15, 0.95);
}

/* 错误页面样式 */
.error-page {
    text-align: center;
    padding: 100px 0;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-content h1 {
    font-size: 120px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1;
}

.error-content h2 {
    font-size: 32px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.error-content p {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 10px;
}

.error-content .btn {
    margin-top: 30px;
    padding: 12px 30px;
}

/* 搜索页面样式 */
.search-header {
    background: linear-gradient(135deg, var(--primary-color), #357abd);
    padding: 60px 0;
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.search-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/pattern.png') center/cover;
    opacity: 0.1;
}

.search-header h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 15px 60px 15px 25px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-form input[type="text"]:focus {
    outline: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.search-form button {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.search-form button:hover {
    color: #357abd;
    transform: translateY(-50%) scale(1.1);
}

.search-info {
    text-align: center;
    color: var(--text-color);
    margin: 20px 0 40px;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* 搜索结果样式 */
.search-results {
    margin-top: 40px;
}

.no-results {
    text-align: center;
    padding: 60px 0;
    color: var(--text-color);
}

.no-results p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-header {
        padding: 40px 0;
    }
    
    .search-header h1 {
        font-size: 2rem;
    }
    
    .search-form input[type="text"] {
        padding: 12px 50px 12px 20px;
        font-size: 1rem;
    }
    
    .search-form button {
        right: 20px;
        font-size: 1.1rem;
    }
}

/* 投票进度条样式 */
.vote-progress {
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
}

.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-item {
    width: 100%;
}

.progress {
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress.stay {
    background: rgba(46, 204, 113, 0.2);
}

.progress.divorce {
    background: rgba(231, 76, 60, 0.2);
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.progress.stay .progress-bar {
    background: #2ecc71;
}

.progress.divorce .progress-bar {
    background: #e74c3c;
}

.progress-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .vote-progress {
        padding: 0 15px;
    }
    
    .progress {
        height: 25px;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
}

/* 点赞区域样式 */
.like-section {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
}

.like-btn {
    font-size: 1.5rem;
    padding: 15px 40px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.like-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.like-btn i {
    margin-right: 10px;
}

.like-btn.liked {
    background: var(--primary-color);
    color: #fff;
}

.like-tip {
    margin-top: 15px;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.like-count {
    font-size: 1.2rem;
    font-weight: 500;
}

/* 添加这个样式让主要内容区域自动填充剩余空间 */
.content-wrapper {
    flex: 1 0 auto;
} 